import java.math.*;
public class Point2D 
{
	double x, y;
	public void Point2d()
	{
		x=0;
		y=0;
	}
	 
	public double getX() {
		return x;
	}
	public void setX(double x) {
		this.x = x;
	}
	public double getY() {
		return y;
	}
	public void setY(double y) {
		this.y = y;
	}
	public Point2D(double x, double y)
	{
		this.x=x;
		this.y=y;
	}
	public double distanta(Point2D a)
	{
		return Math.sqrt((a.x-this.x)*(a.x-this.x)+(a.y-this.y)*(a.y-this.y));
	}
	public static double distanta(Point2D a,Point2D b )
	{
		return Math.sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y));
	}

	public static void main(String[] argv)
	{
		Point2D a,b;
		a=new Point2D(2,1);
		b=new Point2D(1,2);
		System.out.println(distanta(a,b));
	}
}
